<html>
<head><meta charset="utf-8"><title>Review for  #78407 · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Review.20for.20.20.2378407.html">Review for  #78407</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="221406441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Review%20for%20%20%2378407/near/221406441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Review.20for.20.20.2378407.html#221406441">(Jan 02 2021 at 16:33)</a>:</h4>
<p>Could someone knowledgeable about the query system review the query part of  <a href="https://github.com/rust-lang/rust/issues/78407">#78407</a>?</p>



<a name="221534302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Review%20for%20%20%2378407/near/221534302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Review.20for.20.20.2378407.html#221534302">(Jan 04 2021 at 15:10)</a>:</h4>
<p>Sure, I have started looking at it now.</p>



<a name="221535133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Review%20for%20%20%2378407/near/221535133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Review.20for.20.20.2378407.html#221535133">(Jan 04 2021 at 15:16)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> I could write this as a comment on the PR if you're busy, but I figured it'd be fastest to ask here: Are there potentially other things besides CTFE that would want access to the unoptimized MIR? I ask because I'm curious whether the table <code>mir_for_ctfe</code> should actually be named just <code>unoptimized_mir</code> ?</p>



<a name="221535241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Review%20for%20%20%2378407/near/221535241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Review.20for.20.20.2378407.html#221535241">(Jan 04 2021 at 15:17)</a>:</h4>
<p>oli, can we use it for <code>mir_abstract_const</code>? I think not because <code>mir_for_ctfe</code> runs const prop afaik</p>



<a name="221535293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Review%20for%20%20%2378407/near/221535293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Review.20for.20.20.2378407.html#221535293">(Jan 04 2021 at 15:18)</a>:</h4>
<p>which we don't want for <code>AbstractConst</code>s</p>



<a name="221535330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Review%20for%20%20%2378407/near/221535330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Review.20for.20.20.2378407.html#221535330">(Jan 04 2021 at 15:18)</a>:</h4>
<p>(I suppose such a rename could wait util someone actually wants/needs it, except that such a name implies that it may not <em>always</em> be unoptimized. E.g. if someone were to identify a subset of optimizations that do not hide UB.)</p>



<a name="221535503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Review%20for%20%20%2378407/near/221535503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Review.20for.20.20.2378407.html#221535503">(Jan 04 2021 at 15:19)</a>:</h4>
<p>(which raises the idea of another potential name, instead of <code>unoptimized_mir</code>: <code>mir_with_ub_preserved</code>, or something along those lines.)</p>



<a name="221537712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Review%20for%20%20%2378407/near/221537712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Review.20for.20.20.2378407.html#221537712">(Jan 04 2021 at 15:34)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/131828-t-compiler/topic/Review.20for.20.20.2378407/near/221535241">said</a>:</p>
<blockquote>
<p>oli, can we use it for <code>mir_abstract_const</code>? I think not because <code>mir_for_ctfe</code> runs const prop afaik</p>
</blockquote>
<p>it is unclear whether we want to run const prop, but we should try that out in a separate PR</p>



<a name="221538207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Review%20for%20%20%2378407/near/221538207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Review.20for.20.20.2378407.html#221538207">(Jan 04 2021 at 15:37)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116083">pnkfelix</span> <a href="#narrow/stream/131828-t-compiler/topic/Review.20for.20.20.2378407/near/221535330">said</a>:</p>
<blockquote>
<p>(I suppose such a rename could wait util someone actually wants/needs it, except that such a name implies that it may not <em>always</em> be unoptimized. E.g. if someone were to identify a subset of optimizations that do not hide UB.)</p>
</blockquote>
<p>yes, I think we may want to run some such optimizations at some point, but it's not really clear yet. So for now, the name is accurate, and we need to adjust it once more use cases come up.</p>



<a name="221538695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Review%20for%20%20%2378407/near/221538695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Review.20for.20.20.2378407.html#221538695">(Jan 04 2021 at 15:41)</a>:</h4>
<p>we also have a very badly named <code>mir_const</code> query, which we should totally rename or potentially merge into other queries (I think in the early days of MIR that was (supposed to be) the query that had the MIR for the pre-miri-but-still-MIR-based const evaluator</p>



<a name="221538997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Review%20for%20%20%2378407/near/221538997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Review.20for.20.20.2378407.html#221538997">(Jan 04 2021 at 15:43)</a>:</h4>
<p>I think formal analysis ppl will be very interested in the unoptimized MIR, though that may be better served by disabling all optimizations via <code>mir-opt-level=0</code>, since there are some non-optimizing transformations that clean up MIR</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>